package cn.net.ecode.elec.api.web;

import cn.net.ecode.common.web.BaseController;
import cn.net.ecode.elec.entrust.entity.ElecEntrust;
import cn.net.ecode.elec.entrust.service.ElecEntrustService;
import cn.net.ecode.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName AppEntrustController
 * @Description 一键委托
 * @Author AlanShelby
 * @Date 2019/8/27 0027 8:43
 * @Version 1.0
 */
@RestController
@RequestMapping("/api/entrust")
public class AppEntrustController extends BaseController {
    @Autowired
    private ElecEntrustService elecEntrustService;

    /**
     * @Method entrustList
     * @Description 获取意见委托列表
     * @Author AlanShelby
     * @Date 22:14 2019/9/8 0008
     * @Return cn.net.ecode.util.R
     */
    @RequestMapping(value = "entrustList", method = RequestMethod.GET)
    public R entrustList() {
        List<ElecEntrust> entrustList = elecEntrustService.findList(new ElecEntrust());

        return R.ok().put("entrustList", entrustList);
    }
}
